-
Notifications
You must be signed in to change notification settings - Fork 279
transpile: update dependencies in generated Cargo.toml
#1418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kkysen
wants to merge
1
commit into
kkysen/update-generated-rust-version
Choose a base branch
from
kkysen/update-deps-in-generated-Cargo.toml
base: kkysen/update-generated-rust-version
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
transpile: update dependencies in generated Cargo.toml
#1418
kkysen
wants to merge
1
commit into
kkysen/update-generated-rust-version
from
kkysen/update-deps-in-generated-Cargo.toml
+2
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kkysen
added a commit
that referenced
this pull request
Oct 20, 2025
…for `syn v2.0.107` and `cargo`'s sparse registry `c2rust-bitfields-derive` depends on `syn v2.0`. Without a `Cargo.lock`, like in transpiled projects (as opposed to `c2rust` itself), this will resolve to `syn v2.0.107`, which requires Rust 1.68, but the generated `rust-toolchain.toml` uses Rust 1.65 (the same as our own nightly). This is currently breaking CI for the `c2rust-instrument` tests, and will also break CI for `c2rust-testsuite` once #1418 lands (a bug fix). Furthermore, the old git-based registry fetching is extremely slow in CI, so when #1227 lands and switches to stable, we also want Rust 1.70 for `cargo`'s sparse registry. Due to stable crates now building on stable but testing their output on nightly, it is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this. The combination of this, #1418, #1419, #1420, and #1421 has been tested to work on `libxml2`: ```sh cargo build --release (cd ../c2rust-testsuite/tests/libxml2/repo/ && $OLDPWD/target/release/c2rust-refactor --cargo --rewrite-mode inplace --lib reorganize_definitions )
kkysen
added a commit
that referenced
this pull request
Oct 20, 2025
…for `syn v2.0.107` and `cargo`'s sparse registry `c2rust-bitfields-derive` depends on `syn v2.0`. Without a `Cargo.lock`, like in transpiled projects (as opposed to `c2rust` itself), this will resolve to `syn v2.0.107`, which requires Rust 1.68, but the generated `rust-toolchain.toml` uses Rust 1.65 (the same as our own nightly). This is currently breaking CI for the `c2rust-instrument` tests, and will also break CI for `c2rust-testsuite` once #1418 lands (a bug fix). Furthermore, the old git-based registry fetching is extremely slow in CI, so when #1227 lands and switches to stable, we also want Rust 1.70 for `cargo`'s sparse registry. Due to stable crates now building on stable but testing their output on nightly, it is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this. The combination of this, #1418, #1419, #1420, and #1421 has been tested to work on `libxml2`: ```sh cargo build --release (cd ../c2rust-testsuite/tests/libxml2/repo/ && $OLDPWD/target/release/c2rust-refactor --cargo --rewrite-mode inplace --lib reorganize_definitions )
kkysen
added a commit
that referenced
this pull request
Oct 20, 2025
…for `syn v2.0.107` and `cargo`'s sparse registry `c2rust-bitfields-derive` depends on `syn v2.0`. Without a `Cargo.lock`, like in transpiled projects (as opposed to `c2rust` itself), this will resolve to `syn v2.0.107`, which requires Rust 1.68, but the generated `rust-toolchain.toml` uses Rust 1.65 (the same as our own nightly). This is currently breaking CI for the `c2rust-instrument` tests, and will also break CI for `c2rust-testsuite` once #1418 lands (a bug fix). Furthermore, the old git-based registry fetching is extremely slow in CI, so when #1227 lands and switches to stable, we also want Rust 1.70 for `cargo`'s sparse registry. Due to stable crates now building on stable but testing their output on nightly, it is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this. The combination of this, #1418, #1419, #1420, and #1421 has been tested to work on `libxml2`: ```sh cargo build --release (cd ../c2rust-testsuite/tests/libxml2/repo/ && $OLDPWD/target/release/c2rust-refactor --cargo --rewrite-mode inplace --lib reorganize_definitions ) ```
ee9bf45
to
7f72a0f
Compare
ahomescu
approved these changes
Oct 21, 2025
ahomescu
reviewed
Oct 21, 2025
match extern_crate { | ||
ExternCrate::C2RustBitfields => Self::new("c2rust-bitfields", "0.3", true), | ||
ExternCrate::C2RustAsmCasts => Self::new("c2rust-asm-casts", "0.2", true), | ||
ExternCrate::C2RustBitfields => Self::new("c2rust-bitfields", "0.21", true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get the version of the transpiler here, and make sure it always matches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sure, I think we can do that, too. I'll add a commit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These have been missed for a long time, so we've been using 6-year-old versions this whole time.